package com.lzy.web;

import java.util.List;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.lzy.support.ComboBeanSupport;
import com.lzy.support.DictionaryContext;

@Controller
@RequestMapping(value="/dictionary")
public class DictionaryController {

	@RequestMapping("/key/{key}")
	@ResponseBody
	public List<ComboBeanSupport> loadBean(@PathVariable String key) {
		
		if(key.equals("taskType")){
			return DictionaryContext.taskTypeList;
		}
		
		if(key.equals("yesno")){
			return DictionaryContext.YesOrNoList;
		}
		
		return DictionaryContext.YesOrNoList;
	}
}
